#include <stdexcept>

#include "generator.hpp"

std::string generate(const std::vector<Statement*>& statements) {
    std::string output;

    for (const auto& stat : statements) {
        stat->analyze();
    }

    for (const auto& stat : statements) {
        output += stat->to_code();
    }

    return output;
}
